package com.jiuwu.note.vo;

import java.math.BigDecimal;

public class InCome { 
	
	/**
	 * 购买汇率
	 */
	public float realExchangeRate;
	
	/**
	 * 卖出汇率
	 */
	public float saleExchangeRate;
	
	/**
	 * 买入所花钱
	 */
	public float buyTotal;
	
	/**
	 * 卖出所花
	 */
	public int saleTotal;
	
	
	public int inCome;

	
	public InCome (float realExchangeRate,float saleExchangeRate,float buyTotal,float saleTotal) {
		this.realExchangeRate = realExchangeRate;
		this.saleExchangeRate = saleExchangeRate;
		this.buyTotal = buyTotal;
		
		BigDecimal sale = new BigDecimal(""+saleTotal).setScale(0, BigDecimal.ROUND_HALF_UP);
		this.saleTotal = sale.intValue();
		float in = this.saleTotal - this.buyTotal;
		this.inCome =  new BigDecimal(""+in).setScale(0, BigDecimal.ROUND_HALF_UP).intValue();
	}
	

	public float getRealExchangeRate() {
		return realExchangeRate;
	}


	public void setRealExchangeRate(float realExchangeRate) {
		this.realExchangeRate = realExchangeRate;
	}


	public float getSaleExchangeRate() {
		return saleExchangeRate;
	}


	public void setSaleExchangeRate(float saleExchangeRate) {
		this.saleExchangeRate = saleExchangeRate;
	}


	public float getBuyTotal() {
		return buyTotal;
	}


	public void setBuyTotal(float buyTotal) {
		this.buyTotal = buyTotal;
	}


	public int getSaleTotal() {
		return saleTotal;
	}


	public void setSaleTotal(int saleTotal) {
		this.saleTotal = saleTotal;
	}


	public int getInCome() {
		return inCome;
	}


	public void setInCome(int inCome) {
		this.inCome = inCome;
	}
	
	
	
	
	

}
